home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / PowerPlant / LProportionalSizer / LProportionalSizer.h < prev   
Encoding:
Text File  |  1997-06-30  |  1.8 KB  |  63 lines  |  [TEXT/CWIE]

  1. //**************************************************************************************
  2. // Filename:    LProportionalSizer.cp
  3. // Copyright © 1997 Dan Crevier. All rights reserved.
  4. // <mailto:Dan.Crevier@pobox.com>
  5. //
  6. // Description:    
  7. //    When this view is resized, it resizes all its subview proportionally, as if the
  8. //  view is zoomed, or shrunk
  9. //  To use it, make it as large as its enclosing view, with all of the frame bindings
  10. //    turned on.  Then put panes into the LProportionalSizer, and they will be resized
  11. //    when the superview is resized
  12. //  It was written for use with my LHiResPrintout class, but I'm sure there are other
  13. //    uses
  14. //**************************************************************************************
  15. // Revision History:
  16. // Monday, June 30, 1997 - Original
  17. //**************************************************************************************
  18.  
  19. #ifndef _H_LProportionalSizer
  20. #define __H_LProportionalSizer
  21. #pragma once
  22.  
  23. #if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__)
  24.     #pragma import on
  25. #endif
  26.  
  27. #include <LView.h>
  28.  
  29. class LProportionalSizer: public LView
  30. {
  31.     public:
  32.     // Public Enums and Constants
  33.         enum { class_ID = 'prSz' };
  34.     
  35.     // Public Functions
  36.  
  37.         //Default Constructor
  38.                             LProportionalSizer();
  39.         // Note: Add non-stream constructors here
  40.         
  41.         // Stream Constructor 
  42.                             LProportionalSizer( LStream *inStream );
  43.         //Destructor
  44.         virtual                ~LProportionalSizer();
  45.  
  46.         virtual void        ResizeFrameBy(
  47.                                     Int16                inWidthDelta,
  48.                                     Int16                inHeightDelta,
  49.                                     Boolean                inRefresh);
  50.                                 
  51.         
  52.     private:
  53.     // Member Variables and Classes
  54.     
  55.     
  56.     // Private Functions
  57.         // Defensive programming. No  operator=
  58.         LProportionalSizer&            operator=(const LProportionalSizer&);
  59.         // Copy Constructor
  60.                             LProportionalSizer(const LProportionalSizer& inLProportionalSizer);
  61. };
  62.  
  63. #endif